home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Communications Toolbox / CommToolbox 1.1 / Interfaces / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  2.4 KB  |  123 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.     ConnectionTools.h
  3.     C Interface to the Macintosh Libraries
  4.  
  5.         Copyright Apple Computer, Inc. 1988-1991
  6.         All rights reserved
  7. ************************************************************/
  8.  
  9.  
  10. #ifndef __CONNECTIONTOOLS__
  11. #define __CONNECTIONTOOLS__
  12.  
  13. #ifndef __DIALOGS__
  14. #include <Dialogs.h>
  15. #endif
  16.  
  17. #ifndef __CONNECTIONS__
  18. #include <Connections.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.  
  25. /* messages for DefProc */
  26.  cmInitMsg = 0,
  27.  cmDisposeMsg = 1,
  28.  cmSuspendMsg = 2,
  29.  cmResumeMsg = 3,
  30.  cmMenuMsg = 4,
  31.  cmEventMsg = 5,
  32.  cmActivateMsg = 6,
  33.  cmDeactivateMsg = 7,
  34.  
  35.  cmIdleMsg = 50,
  36.  cmResetMsg = 51,
  37.  cmAbortMsg = 52,
  38.  
  39.  cmReadMsg = 100,
  40.  cmWriteMsg = 101,
  41.  cmStatusMsg = 102,
  42.  cmListenMsg = 103,
  43.  cmAcceptMsg = 104,
  44.  cmCloseMsg = 105,
  45.  cmOpenMsg = 106,
  46.  cmBreakMsg = 107,
  47.  cmIOKillMsg = 108
  48. };
  49. enum {
  50.  cmEnvironsMsg = 109,
  51.  
  52. /* new connection tool messages for ctb 1.1 */
  53.  cmNewIOPBMsg = 110,
  54.  cmDisposeIOPBMsg = 111,
  55.  cmGetErrorStringMsg = 112,
  56.  cmPBReadMsg = 113,
  57.  cmPBWriteMsg = 114,
  58.  cmPBIOKillMsg = 115,
  59.  
  60. /*    messages for validate DefProc    */
  61.  cmValidateMsg = 0,
  62.  cmDefaultMsg = 1,
  63.     
  64. /*    messages for Setup DefProc    */
  65.  cmSpreflightMsg = 0,
  66.  cmSsetupMsg = 1,
  67.  cmSitemMsg = 2,
  68.  cmSfilterMsg = 3,
  69.  cmScleanupMsg = 4,
  70.     
  71. /*    messages for scripting defProc    */
  72.  cmMgetMsg = 0,
  73.  cmMsetMsg = 1,
  74.     
  75. /*    messages for localization defProc    */
  76.  cmL2English = 0,
  77.  cmL2Intl = 1
  78.  
  79. /*    private data constants */
  80.  
  81. #define cdefType    'cdef'        /* main connection definition procedure    */
  82. #define cvalType    'cval'        /* validation definition procedure    */
  83. #define csetType    'cset'        /* connection setup definition procedure    */
  84. #define clocType    'cloc'        /* connection configuration localization defProc    */
  85. #define cscrType    'cscr'        /* connection scripting defProc interfaces    */
  86.  
  87. #define cbndType    'cbnd'        /* bundle type for connection    */
  88. #define cverType    'vers'    
  89. };
  90.  
  91. struct CMDataBuffer {
  92.     Ptr        thePtr;
  93.     long    count;
  94.     CMChannel channel;
  95.     CMFlags    flags;
  96. };
  97.  
  98. typedef struct CMDataBuffer CMDataBuffer;
  99. typedef CMDataBuffer *CMDataBufferPtr;
  100.  
  101. struct CMCompletorRecord {
  102.     Boolean    async;
  103.     ProcPtr    completionRoutine;
  104. };
  105.  
  106. typedef struct CMCompletorRecord CMCompletorRecord;
  107. typedef CMCompletorRecord *CMCompletorPtr;
  108.  
  109. /*    Private Data Structure    */
  110.  
  111. struct CMSetupStruct {
  112.     DialogPtr theDialog;
  113.     short count;
  114.     Ptr theConfig;
  115.     short    procID;              /* procID of the tool    */
  116. };
  117.  
  118. typedef struct CMSetupStruct CMSetupStruct;
  119. typedef CMSetupStruct *CMSetupPtr;
  120.  
  121.  
  122.  
  123. #endif